package com.testfileupload.uploadimg.design.observe;

public class Client {

    public static void main(String[] args) {
        //定义观察者
        Observer lisi = new Lisi();
        Observer wangsi = new Wangshi();
        Observer liusi = new Liusi();
        //定义被观察者
        Hanfeizi hanfeizi = new Hanfeizi();
        hanfeizi.addObserver(lisi);
        hanfeizi.addObserver(wangsi);
        hanfeizi.addObserver(liusi);
        hanfeizi.haveBreakfast();
    }
}
